package com.spring.zhz;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainTest {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Hello hello = (Hello) context.getBean("hello");

        System.out.println(hello.getName());
        System.out.println(((User) context.getBean("user")).getName());
        System.out.println(((Student) context.getBean("zhz")).toString());
        System.out.println(((User) context.getBean("userNamespace1")).getName());
        System.out.println(((People) context.getBean("people")).toString());

    }
}

